<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="">
		<meta name="author" content="">
		<title>辰湖游戏管理</title>

		<!-- Bootstrap core CSS -->
		<link th:href="@{/webjars/bootstrap/4.3.1/css/bootstrap.css}" rel="stylesheet">
		<!-- 登录页面样式 -->
		<link th:href="@{/asserts/css/signin.css}" rel="stylesheet">

		<style>
			body{
				background-image: url(/asserts/images/bg.jpg);/*设置背景图片*/
				background-repeat:no-repeat;/*图片适应窗口大小，这里设置的是不进行平铺*/
				background-attachment: fixed;/*图片相对于浏览器固定,这里设置背景图片固定，不随内容滚动*/
				background-origin: border-box;/*从边框区域显示*/
				background-size:cover;/*指定图片大小，此时会保持图像的纵横比并将图像缩放成将完全覆盖背景定位区域的最小大小*/
			}
		</style>
	</head>

	<body class="text-center">
		<form class="form-signin" th:action="@{/usr/login}" method="post">
			<img class="mb-4" th:src="@{/asserts/images/login-hi.jpg}" alt="" width="72" height="72">
			<h1 class="h3 mb-3 font-weight-normal" th:text="#{login.tip}">Please sign in</h1>
			<!-- 提示信息区域，只有消息存在时才显示整个标签 -->
			<p style="color: red;" th:text="${session.glo_err_msg}" th:if="${not #strings.isEmpty(session.glo_err_msg)}"></p>

			<label class="sr-only" th:text="#{login.username}">Username</label>
			<input type="text" name="username" class="form-control" th:placeholder="#{login.username}" required="" autofocus="">
			<label class="sr-only" th:text="#{login.password}">Password</label>
			<input type="password" name="password" class="form-control" th:placeholder="#{login.password}" required="">
			<div class="checkbox mb-3">
			<label>
				<input type="checkbox" name="remember"> [[#{login.remember}]]
        	</label>
			</div>
			<button class="btn btn-lg btn-primary btn-block" type="submit">[[#{login.btn}]]</button>
			<p class="mt-5 mb-3 text-muted">© 2019-2020</p>
			<!-- 国际化处理 -->
			<a class="btn btn-sm" th:href="@{/usr/login(l='zh_CN')}">中文</a>
			<a class="btn btn-sm" th:href="@{/usr/login(l='en_US')}">English</a>
		</form>

	</body>

</html>